package com.woniuxy.userapp.client;

import com.woniuxy.commons.util.Result;
import com.woniuxy.userapp.client.param.AddCoachInfo;
import com.woniuxy.userapp.client.param.CoachInfo;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: Mr.zhou
 * \* Date: 2022/8/6
 * \* Time: 16:41
 * \* To change this template use File | Settings | File Templates.
 * \* Description:
 * \
 */

@FeignClient(contextId = "CoachClient",name="yoga-user", path="/user")
@Component
public interface CoachClient {

    /**
     * 通过教练id查询账户id
     * @param CoachId
     * @return
     */
    @ApiOperation("通过教练id查询账户id")
    @RequestMapping(value = "/coach/findAccountIdByCoachId",method = RequestMethod.GET)
    public Result<Integer> findAccountIdByCoachId(@RequestParam Integer CoachId);

    @ApiOperation("通过前台账户id查询教练信息")
    @GetMapping(value = "/coach/findCoachByAccountId")
    public Result<CoachInfo> findCoachByAccountId(@RequestParam Integer accountId);

    @ApiOperation("根据教练id查询教练信息")
    @RequestMapping(value = "/coach/findCoachByCoachId",method = RequestMethod.GET)
    public Result<CoachInfo> findCoachByCoachId(@RequestParam Integer coachId);

    @ApiOperation("完善教练信息")
    @RequestMapping(value = "/coach/addCoach",method = RequestMethod.POST)
    public Result addCoach(@RequestBody AddCoachInfo addCoachInfo);

}
